<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/pages/share/taglib.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>运城市安全生产隐患排查治理信息系统</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link href="<%=basePath%>/css/style.css" rel="stylesheet" type="text/css"/>
	<script src="<%=basePath%>/js/js.js" type="text/javascript"></script>
	<script src="<%=basePath%>/js/jquery-1.7.1.min.js" type="text/javascript"></script>
	<%
		String imgPath=basePath.substring(0,basePath.indexOf(path))+"/ycFile";
		//System.out.println(imgPath);
	 %>
	<script type="text/javascript">
		function inrandRefresh(){
	   		var inrandSpanM = document.getElementById("inrandSpan");
	   		inrandSpanM.innerHTML='<img src="<%=basePath%>/image.jsp" onclick="javascript:inrandRefresh();" style="cursor:hand" alt="看不清，换一张图片"/>';
	   	}
	   	function checkspace(checkstr) {
			var str = '';
			for(i = 0; i < checkstr.length; i++) {
				str = str + ' ';
			}
			return (str == checkstr);
		}
		function check(){
			if(checkspace(document.picform.picTitle.value))  {		
				alert("对不起，图片标题不能为空，请重新输入！");
				document.picform.picTitle.focus();
				return false;
			}	
			if(checkspace(document.picform.picType.value))  {		
				alert("对不起，图片类型不能为空，请重新输入！");
				document.picform.picType.focus();
				return false;
			}
			$("#btnSubmit").val("正在提交 ...");
			return true;
		}
		
		$(function() {
			$("#bselect1").change(function() {
				var type = $(this).val();
				if(type == 4) {
					$("#customType").css("display","block");
				} else {
					$("#customType").css("display","none");
				}
			});
			
			if($("#bselect1").val() == 4) {
				$("#customType").css("display","block");
			}
		});
	</script>
  </head>
  
 <body>
<div id="allbody">
	<div class="head">
		<iframe src="<%=basePath%>/head.jsp" width="1160" height="218" scrolling="no" frameborder="0" ></iframe>
	</div>
	<div class="con">
		<div class="left">
			<div class="left_info">
				<iframe src="<%=basePath%>/left_info.jsp" width="244" height="250" id="iframeleft_top"  onLoad="iFrameHeight()"  scrolling="no" frameborder="0" ></iframe>
			</div>
			<div class="left_link">
				<iframe src="<%=basePath%>/corp_left.jsp" width="244" height="200" id="iframeleft_link"  onLoad="iFrameHeight2()" scrolling="no" frameborder="0" ></iframe>
			</div>
		</div>
		<div class="right">
			<div class="right_map"><a href="<%=basePath%>/corp/index.action">首页</a> &gt; <a href="<%=basePath%>/enterprise/corp_lookInfo.action">企业基本信息</a> &gt; <span>修改图片</span></div>
			<div class="right_list">
				<table border="0" cellpadding="0" cellspacing="0" align="center" class="corplist">
					<tr class="tit">
						<th style="text-align:right;padding-right:10px;"> <li><a href="<%=basePath%>/enterprise/pic_list.action">返回</a></li></th>
					</tr>
				</table>
				<form name="picform" action="<%=basePath%>/enterprise/pic_editPic.action" method="post" enctype="multipart/form-data">
					<table border="0" cellpadding="0" cellspacing="0" align="center" class="infolist">
					<tr>
							<td class="info_tit" width="110" style="border-top:none">提示：</td>
							<td><font color="green"><b>请选择大小为2MB以下的图片进行上传,图片过大,上传过程耗时会比较长.</b></font></td>
						</tr>
						<tr>
							<td class="info_tit" width="110" style="border-top:none">标 题：</td>
							<td><input name="picTitle" type="text" class="info_input" value="<s:property value="corpPic.picTitle"/>" id="bit1"/><span class="note4">*</span></td>
						</tr>
						<tr>
							<td class="info_tit">图片类型：</td>
							<td><select name="picType" id="bselect1">
									<option value="">请选择</option>
									<option value="1" <s:if test="%{corpPic.picType==1}">selected="selected"</s:if>>企业风貌图</option>
									<option value="2" <s:if test="%{corpPic.picType==2}">selected="selected"</s:if>>企业平面图</option>
									<option value="3" <s:if test="%{corpPic.picType==3}">selected="selected"</s:if>>工艺流程图</option>
									<option value="5" <s:if test="%{corpPic.picType==5}">selected="selected"</s:if>>生产装置图</option>
									<option value="4" <s:if test="%{corpPic.picType==4}">selected="selected"</s:if>>其他</option>
								</select><span class="note4">*</span><input id="customType"  name="customType" value="${corpPic.customType }" style="display:none;"> 
								
							</td>
						</tr>
						<tr>
							<td class="info_tit" style="border-top:none">图片：</td>
							<td>
							<img src="<%=imgPath%>/<s:property value="corpPic.picPath"/>"/>
							<br/>
							<input type="file" name="pic" onkeypress="return false;" /><span class="note4" style="color: green">请选择以下图片格式(png,jpg,gif)进行上传</span></td>
						</tr>
						<tr>
							<td class="info_tit">备注：</td>
							<td><textarea rows="3" cols="60" name="picRemark"><s:property value="corpPic.picRemark"/></textarea>
							</td>
						</tr>
						<tr>
							<td colspan="2"  class="info_tit" style="text-align:center;height:35px;"><input type="submit" name="btntj" class="input_link" id="btnSubmit" value="提 交"/> <input type="reset" name="btnset" class="input_link" id="btnset" value="重 置"/> </td>
						</tr>
					</table>
					<input type="hidden" value="<s:property value="corpPic.id"/>" name="picId" />
				</form>
			</div>
		</div>
	</div>
	<div class="foot">
		<iframe src="<%=basePath%>/foot.html" width="1160" height="89" scrolling="no" frameborder="0" ></iframe>
	</div>
</div>
<s:if test="%{tip!=null}">
	<script>
		alert('${tip}');
	</script>
</s:if>
</body>
</html>
